home *** CD-ROM | disk | FTP | other *** search
Text File | 1995-07-28 | 1.9 KB | 130 lines | [TEXT/MPS ] |
- #ifndef __BUILDINGBLOCKSTEST__
- #include "BuildingBlocksTest.h"
- #endif
-
- #ifndef __OCEOBJECTSTESTS__
- #include "OCEObjectsTests.h"
- #endif
-
- #ifndef __TUPLETESTS__
- #include "TupleTests.h"
- #endif
-
- #pragma segment BuildingBlocksTestMain
-
- #ifndef __OSEVENTS__
- #include <OSEvents.h>
- #endif
-
- #ifndef __TOOLUTILS__
- #include <ToolUtils.h>
- #endif
-
- Boolean
- ModifierKeyIsDown ( short modKey )
- {
- KeyMap keys;
- long keyBit;
- Boolean result = false;
-
- switch ( modKey )
- {
- case optionKey:
- keyBit = 61;
- break;
-
- case shiftKey:
- keyBit = 63;
- break;
-
- case cmdKey:
- keyBit = 48;
- break;
-
- case controlKey:
- keyBit = 60;
- break;
-
- case alphaLock:
- keyBit = 62;
- break;
-
- default:
- keyBit = 0;
- break;
- }
-
- GetKeys ( keys );
-
- if ( keyBit )
- result = BitTst ( (Ptr) &keys, keyBit );
- else
- result = false;
-
- return result;
- }
-
- /*
- File: BuildingBlocksTestMain.cp
-
- Copyright: © 1991-1994 by Apple Computer, Inc.
- All rights reserved.
-
- Part of the AOCE Sample SMSAM Package. Consult the license
- which came with this software for your specific legal rights.
-
- */
-
-
-
- TDebugFlag chrisFlag ( 1 );
- pascal void Debugger () = 0xA9FF;
-
- extern "C"
- {
- pascal void BP(long /* pc */)
- {
- }
-
- pascal void EP(long /* pc */)
- {
- }
- }
-
- /**********************************|****************************************/
-
- int main ( int /* argc */, const char* /* argv[] */ )
- {
- if ( ModifierKeyIsDown ( shiftKey ) )
- Debugger ();
-
- #if 1
-
- RunAllOCEOjectsTests ();
-
- #else
-
- chrisFlag.SetFlag ( kExtensiveTupleKeyDescribe, true );
- chrisFlag.SetFlag ( kExtensiveBufferDescribe, true );
- chrisFlag.SetFlag ( kExtensiveTupleDBDescribe, false );
-
- Debugger ();
-
- AllDatabaseTests ();
- DiskLogTests ();
-
- PrintSizes ();
- BufferTests ();
- TupleTests ();
- RamDatabaseTest ();
- FolderTest ();
- HFSDatabaseTest ();
- BTreeDatabaseTest ();
-
- #endif
-
- return 0;
- }
-
- /***********************************|****************************************/
-